home *** CD-ROM | disk | FTP | other *** search
- ' Demo Script ACODemo3.Vbs
- '
- ' Alpha Centauri - March 1998
- ' ---------------------------
-
- Dim etFlat ' EdgeType Constant
- Dim tsSpace ' ThousandsSep Constant
- Dim lbShort ' Label Constant
-
- ' Set Constants
- etRaised = 0
- tsSpace = 0
- lbShort = 0
-
- ' Connect to Personal Express and open the ACODemo Database
- Call ACOTable.Connect(False)
- Call ACOTable.Open("C:\PROGRA~1\ACOTABLE\ACODEMO", True)
-
- ACOTable.AutoRefresh = FALSE
-
- ' Remove previously selected Measures
- Call ACOTable.RemoveAllMeasures()
-
- ' Set General Measure Properties
- ACOTable.Decimals = 0
- ACOTable.ThousandsSep = tsSpace
- ACOTable.EdgeTypeDown = etFlat
- ACOTable.FontColor = 255*256*256 + 0 + 0
- ACOTable.DownEdgeFillColor = 234*256*256 + 219*256 + 160
-
- ' Add the following measures to the table
- Call ACOTable.AddMeasure("UNITS")
- Call ACOTable.AddMeasure("AVGPRICE")
-
- ' Set Labels for the measures
- Call ACOTable.SetMeasLabel("UNITS", lbShort, "Units")
- Call ACOTable.SetMeasLabel("AVGPRICE", lbShort, "Avg.Price")
-
- ' Set specific properties for the measure UNITS
- Call ACOTable.SetMeasUseDisplayFormat("UNITS", TRUE)
- Call ACOTable.SetMeasFillColor("UNITS", 225*256*256 + 205*256 + 228)
-
- ' Set specific properties for the measure AVGPRICE
- Call ACOTable.SetMeasUseDisplayFormat("AVGPRICE", TRUE)
- Call ACOTable.SetMeasFillColor("AVGPRICE", 205*256*256 + 228*256 + 193)
-
- ' Set Selections on TIME & PRODUCT
- Call ACOTable.SetSelection("TIME", 0, "Lmt TIME To '1996\n1997\n1998';Lmt TIME add Children Using T0.PARENT")
- Call ACOTable.SetSelection("PRODUCT", 1)
-
- ' Rotate dimensions
- ' Rotate PRODUCT & GEOGRAPHY
- ' Move TIME to the Across Edge
- Call ACOTable.Rotate("PRODUCT", "GEOGRAPHY")
- Call ACOTable.ChangeEdge("TIME", 1)
-
- ACOTable.AutoRefresh = TRUE
-
- ' Display info when clicking on a specific cell
- Sub ACOTable_OnLeftClick(col, row)
- Call MsgBox("Dimension Values : " + _
- Chr(10) + Chr(13) + Chr(10) + Chr(13) + _
- "Measure : " + _
- ACOTable.GetDimValue("MEASURE", col, row, 0) + _
- Chr(10) + Chr(13) + _
- "Geography : " + _
- ACOTable.GetDimValue("GEOGRAPHY", col, row, 0) + _
- Chr(10) + Chr(13) + _
- "Product : " + _
- ACOTable.GetDimValue("PRODUCT", col, row, 0) + _
- Chr(10) + Chr(13) + _
- "Time : " + _
- ACOTable.GetDimValue("TIME", col, row, 0) + _
- Chr(10) + Chr(13) + _
- "Distribution : " + _
- ACOTable.GetDimValue("DISTRIBUTION", col, row, 0) + _
- Chr(10) + Chr(13) + Chr(10) + Chr(13) + _
- "Data Value : " + _
- CStr(ACOTable.GetDataValue(col, row, TRUE)) + _
- Chr(10) + Chr(13), _
- 64, "ACOTable - " + CStr(Now()))
- End Sub
-
- Call MsgBox("Click on a data cell to get all the cell information.", _
- 64, "ACOTable DemoScript 3")
-